package com.atzzy.ysmall.ysmall_mapper;

import com.atzzy.ysmall.ysmall_beans.Product;
import com.atzzy.ysmall.ysmall_beans.ProductVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author JAVAZeng
 * @Date 2022/3/3 14:01
 * @Version 1.0
 */
@Mapper
@Repository
public interface ProductMapper {
    List<Product> selectRecommendProducts();

    List<Product> selectGoodProducts();

    List<Product> selectGoodProductsByImp(String productImporId);

    List<Product> selectGoodProductPersonal();

    Product selectProductStatus(Integer productId);

    List<ProductVo> selectProductByCategoryId(@Param("categoryId") int categoryId,@Param("start") int start,@Param("limit") int limit);

    int selectCountByCategoryId(@Param("caregoryId") int categoryId);

    List<String> selectBrandByCategoryId(@Param("categoryId") int categoryId);

    List<ProductVo> selectProductByKeyWord(@Param("keyword") String keyword,@Param("start") int start,@Param("limit") int limit);

    int selectCountByKeyWord(@Param("keyword") String keyword);

    List<String> selectBrandByKeyword(@Param("keyword") String keyword);
}
